package com.travel.server.manager.impl.controller;

import com.travel.server.manager.api.IMessageService;
import com.travel.server.manager.dto.request.EmptyRequest;
import com.travel.server.manager.dto.request.PageRequest;
import com.travel.server.manager.dto.request.message.*;
import com.travel.server.manager.impl.controller.base.AbstractController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiZhenhui
 * @Date: 2018/11/5 18:11
 * @Desc:
 */
@RestController
public class MessageController extends AbstractController implements IMessageService {

    @Override
    public Object queryMessageTemplate(@RequestBody EmptyRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object sendMessage(@RequestBody SendMessageRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryMessageMailList(@RequestBody PageRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteMessage(@RequestBody DeleteMessageRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateMessageMail(@RequestBody UpdateMessageMailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryMessageMsgList(@RequestBody PageRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateMessageMsg(@RequestBody UpdateMessageMsgRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryMessageMsgDetail(@RequestBody QueryMessageMsgDetailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryMessageMailDetail(@RequestBody QueryMessageMailDetailRequest request) {
        return this.getCommand().handle(request);
    }
}
